import { getAnswerDetails, getAnswerList, getLaMiaRisposta, } from "@/services/modules/question"
import { IAnswerDetails, IAnswerList, ILaMiaRisposta } from "@/utils/questions"

class answerDetail {
    //问题回显详情
    AnswerDetails: IAnswerDetails ={} as IAnswerDetails
    async getAnswerDetails(answerId: string) {
        let res = await getAnswerDetails(answerId)
        this.AnswerDetails=res.data
        console.log(this.LaMiaRisposta)
    }

    //问题评论列表数据
    AnswerList: IAnswerList[] = []
    async getAnswerList(answerId: string) {
        let res = await getAnswerList(answerId);
        if (res.rows) {
            this.AnswerList = res.rows
        }
    }

    // 我的问答数据
    LaMiaRisposta: ILaMiaRisposta ={} as ILaMiaRisposta
    async getLaMiaRisposta() {
        let res = await getLaMiaRisposta()
        if(res.data){
            this.LaMiaRisposta=res.data
        }
      
    }


}

export default new answerDetail